﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RelateCategoryAndBrand.ascx.cs" Inherits="Goods_RelateCategoryAndBrand" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<%@ Import Namespace="Shopping.BLL" %>
<%@ Import Namespace="System.Collections.Generic" %>

<%
     if(listOfCategory != null)
     { %>

<h1 class="importedtitleOne">相关类别</h1>
	  <ul class="importedFoods">
	    <li class="importedBottomLine">
		    <%
                for (int i = 0; i < listOfCategory.Count; ++i)
               {
                   if (i == 0 || (i + 1) % 2 > 0)
                   {
                       Response.Write("<p class=\"dairyP\">");
                       Response.Write("<a  href=\"/Goods/Search.aspx?KeyWords=" + HttpUtility.UrlEncode(listOfCategory[i].Name) + "\" >");
                   }
                   else
                       Response.Write("<a  href=\"/Goods/Search.aspx?KeyWords=" + HttpUtility.UrlEncode(listOfCategory[i].Name) + "\" class=\"dairyA\">");
                   Response.Write(listOfCategory[i].Name);
                   Response.Write("</a>");
                   if ((i + 1) == listOfCategory.Count || (i + 1) % 2 == 0)
                       Response.Write("</p>");
               }
          %>
	    </li>
	 </ul>
	<%} %>
    <!--titleThree start-->
    <%
     if(listOfBrands != null)
     { %>
    <h1 class="titleThree">相关品牌</h1>
    <ul class="importedFoods">
	    <li class="importedBottomLine">
           <%
               for (int i = 0; i < listOfBrands.Count; ++i)
               {
                   if (i == 0 || (i + 1) % 2 > 0)
                   {
                       Response.Write("<p class=\"dairyP\">");
                       Response.Write("<a  href=\"/Brands/" + listOfBrands[i].ID + ".html\" >");
                   }
                   else
                       Response.Write("<a  href=\"/Brands/" + listOfBrands[i].ID + ".html\" class=\"dairyA\">");
                   Response.Write(listOfBrands[i].Name);
                   Response.Write("</a>");
                   if ((i + 1) == listOfBrands.Count || (i + 1) % 2 == 0)
                       Response.Write("</p>");
               }
          %>
		  
	    </li>
	  </ul>
      <%} %>

